﻿
SET SQL DIALECT 3;

SET NAMES NONE;

CREATE TABLE PERSON(
    ID  INTEGER NOT NULL,
    NAME VARCHAR(50),
    SURNAME VARCHAR(50),
    ADDRESS VARCHAR(200)
    BIRTH_DATE     DATE
);

ALTER TABLE DIVISION ADD PRIMARY KEY (ID);

--------------------------------

SET SQL DIALECT 3;

SET NAMES NONE;

CREATE TABLE LEARNER(
    ID  INTEGER NOT NULL,
    FACULTY_ID INTEGER
);

ALTER TABLE DIVISION ADD PRIMARY KEY (ID);

--------------------------------

SET SQL DIALECT 3;

SET NAMES NONE;

CREATE TABLE APPLICANT(
    ID  INTEGER NOT NULL,
    ENTRANCE_YEAR INTEGER,
    HIGH_SCHOOL VARCHAR(100)
);

ALTER TABLE DIVISION ADD PRIMARY KEY (ID);

--------------------------------

SET SQL DIALECT 3;

SET NAMES NONE;

CREATE TABLE STUDENT(
    ID  INTEGER NOT NULL,
    GRADUATE_YEAR INT
);

ALTER TABLE DIVISION ADD PRIMARY KEY (ID);

--------------------------------

SET SQL DIALECT 3;

SET NAMES NONE;

CREATE TABLE ASPIRANT(
    ID  INTEGER NOT NULL,
    DIPLOMA_THESIS VARCHAR(100),
    DEGREE VARCHAR(100)
);

ALTER TABLE DIVISION ADD PRIMARY KEY (ID);

--------------------------------

SET SQL DIALECT 3;

SET NAMES NONE;

CREATE TABLE EMPLOYEE(
    ID  INTEGER NOT NULL,
    SALARY INT
);

ALTER TABLE DIVISION ADD PRIMARY KEY (ID);

--------------------------------

SET SQL DIALECT 3;

SET NAMES NONE;

CREATE TABLE SCIENTIFIC_EMPLOYEE(
    ID  INTEGER NOT NULL,
    DEGREE VARCHAR(100)
);

ALTER TABLE DIVISION ADD PRIMARY KEY (ID);

--------------------------------

SET SQL DIALECT 3;

SET NAMES NONE;

CREATE TABLE SUPPORT_EMPLOYEE(
    ID  INTEGER NOT NULL,
    SCHEDULE VARCHAR(500)
);

ALTER TABLE DIVISION ADD PRIMARY KEY (ID);

